package com.github.zzay.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.zzay.admin.entity.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

/**
 * @author zzay
 * @interfaceName AdminMapper
 * @description Mapper class of entity "Admin".
 * @create 2022/07/04 21:53
 */
@Mapper
@Repository
public interface AdminMapper extends BaseMapper<Admin> {

    /**
     * Select the admin with the given username.
     *
     * @param username Username
     * @return Admin with the given username
     */
    Admin selectByUsername(String username);

    /**
     * Select the admin with the given real name.
     *
     * @param realName Real name
     * @return Admin with the given  real name
     */
    Admin selectByRealName(String realName);

    /**
     * Select the admin with the given email.
     *
     * @param email Email
     * @return Admin with the given email
     */
    Admin selectByEmail(String email);

    /**
     * Select the admin with the given phone.
     *
     * @param phone Phone
     * @return Admin with the given phone
     */
    Admin selectByPhone(String phone);

}
